from script.get_user_info.response.nowcoder_response import nc_response
from bs4 import BeautifulSoup

# 得到 nowcoder rating
def nc_problem_number(uid):
    html_content = nc_response(uid)
    soup = BeautifulSoup(html_content, 'html.parser')
    elements = soup.select('div.my-state-item:nth-child(2) > div:nth-child(1)')
    return elements[0].get_text()

if __name__ == '__main__':
    print(nc_problem_number('961118220'))